home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 July: Mac OS SDK / Dev.CD Jul 00 SDK2.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / QuickTimeVR.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  38.5 KB  |  1,170 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        QuickTimeVR.h
  3.  
  4.      Contains:    QuickTime VR interfaces
  5.  
  6.      Version:    Technology:    QuickTime VR 2.2
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1997-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __QUICKTIMEVR__
  18. #define __QUICKTIMEVR__
  19.  
  20. #ifndef __CONDITIONALMACROS__
  21.     #include <ConditionalMacros.h>
  22. #endif
  23.  
  24. #ifndef __DIALOGS__
  25.     #include <Dialogs.h>
  26. #endif
  27.  
  28. #ifndef __MOVIES__
  29.     #include <Movies.h>
  30. #endif
  31.  
  32.  
  33.  
  34.  
  35. #if PRAGMA_ONCE
  36. #pragma once
  37. #endif
  38.  
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42.  
  43. #if PRAGMA_IMPORT
  44. #pragma import on
  45. #endif
  46.  
  47. #if PRAGMA_STRUCT_ALIGN
  48.     #pragma options align=mac68k
  49. #elif PRAGMA_STRUCT_PACKPUSH
  50.     #pragma pack(push, 2)
  51. #elif PRAGMA_STRUCT_PACK
  52.     #pragma pack(2)
  53. #endif
  54.  
  55. /******************************************************************************
  56.  *                                                                           **
  57.  * ABOUT QTVR_OLD_CALLS:                                                     **
  58.  *                                                                           **
  59.  * NOTE: Define QTVR_OLD_CALLS to 1 for your application makefile/project    **
  60.  *       only if you are sure that you need to use the older calls for       **
  61.  *       compatibility with VR 2.0 and 2.0.1 on the Macintosh                ** 
  62.  *                                                                           **
  63.  *****************************************************************************/
  64. #ifndef QTVR_OLD_CALLS
  65. #define QTVR_OLD_CALLS 0
  66. #endif  /* !defined(QTVR_OLD_CALLS) */
  67.  
  68. typedef struct OpaqueQTVRInstance*         QTVRInstance;
  69.  
  70. /* Released API Version numbers */
  71. #define kQTVRAPIMajorVersion02  (0x02)
  72. #define kQTVRAPIMinorVersion00  (0x00)
  73. #define kQTVRAPIMinorVersion01  (0x01)
  74. #define kQTVRAPIMinorVersion10  (0x10)
  75. #define kQTVRAPIMinorVersion20  (0x20)
  76.  
  77. /* Version numbers for the API described in this header */
  78. #define kQTVRAPIMajorVersion kQTVRAPIMajorVersion02
  79. #define kQTVRAPIMinorVersion kQTVRAPIMinorVersion20
  80.  
  81.  
  82. enum {
  83.     kQTVRControllerSubType        = FOUR_CHAR_CODE('ctyp'),
  84.     kQTVRQTVRType                = FOUR_CHAR_CODE('qtvr'),
  85.     kQTVRPanoramaType            = FOUR_CHAR_CODE('pano'),
  86.     kQTVRObjectType                = FOUR_CHAR_CODE('obje'),
  87.     kQTVROldPanoType            = FOUR_CHAR_CODE('STpn'),        /* Used in QTVR 1.0 release*/
  88.     kQTVROldObjectType            = FOUR_CHAR_CODE('stna')        /* Used in QTVR 1.0 release*/
  89. };
  90.  
  91. #if TARGET_OS_MAC
  92. #define kQTVRUnknownType '????'        // Unknown node type
  93. #else
  94. #define kQTVRUnknownType '\?\?\?\?'    // Unknown node type
  95. #endif  /* TARGET_OS_MAC */
  96.  
  97. /* QTVR hot spot types*/
  98. enum {
  99.     kQTVRHotSpotLinkType        = FOUR_CHAR_CODE('link'),
  100.     kQTVRHotSpotURLType            = FOUR_CHAR_CODE('url '),
  101.     kQTVRHotSpotUndefinedType    = FOUR_CHAR_CODE('undf')
  102. };
  103.  
  104. /* Special Values for nodeID in QTVRGoToNodeID*/
  105. enum {
  106.     kQTVRCurrentNode            = 0,
  107.     kQTVRPreviousNode            = (long)0x80000000,
  108.     kQTVRDefaultNode            = (long)0x80000001
  109. };
  110.  
  111. /* Panorama correction modes used for the kQTVRImagingCorrection imaging property*/
  112. enum {
  113.     kQTVRNoCorrection            = 0,
  114.     kQTVRPartialCorrection        = 1,
  115.     kQTVRFullCorrection            = 2
  116. };
  117.  
  118. /* Imaging Modes used by QTVRSetImagingProperty, QTVRGetImagingProperty, QTVRUpdate, QTVRBeginUpdate*/
  119. enum {
  120.     kQTVRStatic                    = 1,
  121.     kQTVRMotion                    = 2,
  122.     kQTVRCurrentMode            = 0,                            /* Special Value for QTVRUpdate*/
  123.     kQTVRAllModes                = 100                            /* Special value for QTVRSetProperty*/
  124. };
  125.  
  126. typedef UInt32                             QTVRImagingMode;
  127. /* Imaging Properties used by QTVRSetImagingProperty, QTVRGetImagingProperty*/
  128. enum {
  129.     kQTVRImagingCorrection        = 1,
  130.     kQTVRImagingQuality            = 2,
  131.     kQTVRImagingDirectDraw        = 3,
  132.     kQTVRImagingCurrentMode        = 100                            /* Get Only*/
  133. };
  134.  
  135. /* OR the above with kImagingDefaultValue to get/set the default value*/
  136. enum {
  137.     kImagingDefaultValue        = (long)0x80000000
  138. };
  139.  
  140. /* Transition Types used by QTVRSetTransitionProperty, QTVREnableTransition*/
  141. enum {
  142.     kQTVRTransitionSwing        = 1
  143. };
  144.  
  145. /* Transition Properties QTVRSetTransitionProperty*/
  146. enum {
  147.     kQTVRTransitionSpeed        = 1,
  148.     kQTVRTransitionDirection    = 2
  149. };
  150.  
  151. /* Constraint values used to construct value returned by GetConstraintStatus*/
  152. enum {
  153.     kQTVRUnconstrained            = 0L,
  154.     kQTVRCantPanLeft            = 1L << 0,
  155.     kQTVRCantPanRight            = 1L << 1,
  156.     kQTVRCantPanUp                = 1L << 2,
  157.     kQTVRCantPanDown            = 1L << 3,
  158.     kQTVRCantZoomIn                = 1L << 4,
  159.     kQTVRCantZoomOut            = 1L << 5,
  160.     kQTVRCantTranslateLeft        = 1L << 6,
  161.     kQTVRCantTranslateRight        = 1L << 7,
  162.     kQTVRCantTranslateUp        = 1L << 8,
  163.     kQTVRCantTranslateDown        = 1L << 9
  164. };
  165.  
  166. /* Object-only mouse mode values used to construct value returned by QTVRGetCurrentMouseMode*/
  167. enum {
  168.     kQTVRPanning                = 1L << 0,                        /* standard objects, "object only" controllers*/
  169.     kQTVRTranslating            = 1L << 1,                        /* all objects*/
  170.     kQTVRZooming                = 1L << 2,                        /* all objects*/
  171.     kQTVRScrolling                = 1L << 3,                        /* standard object arrow scrollers and joystick object*/
  172.     kQTVRSelecting                = 1L << 4                        /* object absolute controller*/
  173. };
  174.  
  175. /* Properties for use with QTVRSetInteractionProperty/GetInteractionProperty*/
  176. enum {
  177.     kQTVRInteractionMouseClickHysteresis = 1,                    /* pixels within which the mouse is considered not to have moved (UInt16)*/
  178.     kQTVRInteractionMouseClickTimeout = 2,                        /* ticks after which a mouse click times out and turns into panning (UInt32)*/
  179.     kQTVRInteractionPanTiltSpeed = 3,                            /* control the relative pan/tilt speed from 1 (slowest) to 10 (fastest). (UInt32) Default is 5;*/
  180.     kQTVRInteractionZoomSpeed    = 4,                            /* control the relative zooming speed from 1 (slowest) to 10 (fastest). (UInt32) Default is 5;*/
  181.     kQTVRInteractionTranslateOnMouseDown = 101,                    /* Holding MouseDown with this setting translates zoomed object movies (Boolean)*/
  182.     kQTVRInteractionMouseMotionScale = 102,                        /* The maximum angle of rotation caused by dragging across the display window. (* float)*/
  183.     kQTVRInteractionNudgeMode    = 103                            /* A QTVRNudgeMode: rotate, translate, or the same as the current mouse mode. Requires QTVR 2.1*/
  184. };
  185.  
  186. /* OR the above with kQTVRInteractionDefaultValue to get/set the default value*/
  187. enum {
  188.     kQTVRInteractionDefaultValue = (long)0x80000000
  189. };
  190.  
  191.  
  192. /* Geometry constants used in QTVRSetBackBufferPrefs, QTVRGetBackBufferSettings, QTVRGetBackBufferMemInfo*/
  193. enum {
  194.     kQTVRUseMovieGeometry        = 0,
  195.     kQTVRVerticalCylinder        = FOUR_CHAR_CODE('vcyl'),
  196.     kQTVRHorizontalCylinder        = FOUR_CHAR_CODE('hcyl')
  197. };
  198.  
  199. /* Resolution constants used in QTVRSetBackBufferPrefs, QTVRGetBackBufferSettings, QTVRGetBackBufferMemInfo*/
  200. enum {
  201.     kQTVRDefaultRes                = 0,
  202.     kQTVRFullRes                = 1L << 0,
  203.     kQTVRHalfRes                = 1L << 1,
  204.     kQTVRQuarterRes                = 1L << 2
  205. };
  206.  
  207. /* QTVR-specific pixelFormat constants used in QTVRSetBackBufferPrefs, QTVRGetBackBufferSettings, QTVRGetBackBufferMemInfo*/
  208. enum {
  209.     kQTVRUseMovieDepth            = 0
  210. };
  211.  
  212. /* Cache Size Pref constants used in QTVRSetBackBufferPrefs, QTVRGetBackBufferSettings*/
  213. enum {
  214.     kQTVRMinimumCache            = -1,
  215.     kQTVRSuggestedCache            = 0,
  216.     kQTVRFullCache                = 1
  217. };
  218.  
  219. /* Angular units used by QTVRSetAngularUnits*/
  220. enum {
  221.     kQTVRDegrees                = 0,
  222.     kQTVRRadians                = 1
  223. };
  224.  
  225. typedef UInt32                             QTVRAngularUnits;
  226. /* Values for enableFlag parameter in QTVREnableHotSpot*/
  227. enum {
  228.     kQTVRHotSpotID                = 0,
  229.     kQTVRHotSpotType            = 1,
  230.     kQTVRAllHotSpots            = 2
  231. };
  232.  
  233. /* Values for kind parameter in QTVRGet/SetConstraints, QTVRGetViewingLimits*/
  234. enum {
  235.     kQTVRPan                    = 0,
  236.     kQTVRTilt                    = 1,
  237.     kQTVRFieldOfView            = 2,
  238.     kQTVRViewCenterH            = 4,                            /* WrapAndConstrain only*/
  239.     kQTVRViewCenterV            = 5                                /* WrapAndConstrain only*/
  240. };
  241.  
  242. /* Values for setting parameter in QTVRSetAnimationSetting, QTVRGetAnimationSetting*/
  243. enum {
  244.                                                                 /* View Frame Animation Settings*/
  245.     kQTVRPalindromeViewFrames    = 1,
  246.     kQTVRStartFirstViewFrame    = 2,
  247.     kQTVRDontLoopViewFrames        = 3,
  248.     kQTVRPlayEveryViewFrame        = 4,                            /* Requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)*/
  249.                                                                 /* View Animation Settings*/
  250.     kQTVRSyncViewToFrameRate    = 16,
  251.     kQTVRPalindromeViews        = 17,
  252.     kQTVRPlayStreamingViews        = 18                            /* Requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)*/
  253. };
  254.  
  255. typedef UInt32                             QTVRObjectAnimationSetting;
  256. enum {
  257.     kQTVRWrapPan                = 1,
  258.     kQTVRWrapTilt                = 2,
  259.     kQTVRCanZoom                = 3,
  260.     kQTVRReverseHControl        = 4,
  261.     kQTVRReverseVControl        = 5,
  262.     kQTVRSwapHVControl            = 6,
  263.     kQTVRTranslation            = 7
  264. };
  265.  
  266. typedef UInt32                             QTVRControlSetting;
  267. enum {
  268.     kQTVRDefault                = 0,
  269.     kQTVRCurrent                = 2,
  270.     kQTVRMouseDown                = 3
  271. };
  272.  
  273. typedef UInt32                             QTVRViewStateType;
  274. enum {
  275.     kQTVRRight                    = 0,
  276.     kQTVRUpRight                = 45,
  277.     kQTVRUp                        = 90,
  278.     kQTVRUpLeft                    = 135,
  279.     kQTVRLeft                    = 180,
  280.     kQTVRDownLeft                = 225,
  281.     kQTVRDown                    = 270,
  282.     kQTVRDownRight                = 315
  283. };
  284.  
  285. typedef UInt32                             QTVRNudgeControl;
  286. enum {
  287.     kQTVRNudgeRotate            = 0,
  288.     kQTVRNudgeTranslate            = 1,
  289.     kQTVRNudgeSameAsMouse        = 2
  290. };
  291.  
  292. typedef UInt32                             QTVRNudgeMode;
  293. /* Flags to control elements of the QTVR control bar (set via mcActionSetFlags) */
  294. enum {
  295.     mcFlagQTVRSuppressBackBtn    = 1L << 16,
  296.     mcFlagQTVRSuppressZoomBtns    = 1L << 17,
  297.     mcFlagQTVRSuppressHotSpotBtn = 1L << 18,
  298.     mcFlagQTVRSuppressTranslateBtn = 1L << 19,
  299.     mcFlagQTVRSuppressHelpText    = 1L << 20,
  300.     mcFlagQTVRSuppressHotSpotNames = 1L << 21,
  301.     mcFlagQTVRExplicitFlagSet    = 1L << 31                        /* bits 0->30 should be interpreted as "explicit on" for the corresponding suppression bits*/
  302. };
  303.  
  304. /* Cursor types used in type field of QTVRCursorRecord*/
  305. enum {
  306.     kQTVRUseDefaultCursor        = 0,
  307.     kQTVRStdCursorType            = 1,
  308.     kQTVRColorCursorType        = 2
  309. };
  310.  
  311. /* Values for flags parameter in QTVRMouseOverHotSpot callback*/
  312. enum {
  313.     kQTVRHotSpotEnter            = 0,
  314.     kQTVRHotSpotWithin            = 1,
  315.     kQTVRHotSpotLeave            = 2
  316. };
  317.  
  318. /* Values for flags parameter in QTVRSetPrescreenImagingCompleteProc*/
  319. enum {
  320.     kQTVRPreScreenEveryIdle        = 1L << 0                        /* Requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)*/
  321. };
  322.  
  323. /* Values for flags field of areasOfInterest in QTVRSetBackBufferImagingProc*/
  324. enum {
  325.     kQTVRBackBufferEveryUpdate    = 1L << 0,
  326.     kQTVRBackBufferEveryIdle    = 1L << 1,
  327.     kQTVRBackBufferAlwaysRefresh = 1L << 2,
  328.     kQTVRBackBufferHorizontal    = 1L << 3                        /* Requires that backbuffer proc be long-rowBytes aware (gestaltQDHasLongRowBytes)*/
  329. };
  330.  
  331. /* Values for flagsIn parameter in QTVRBackBufferImaging callback*/
  332. enum {
  333.     kQTVRBackBufferRectVisible    = 1L << 0,
  334.     kQTVRBackBufferWasRefreshed    = 1L << 1
  335. };
  336.  
  337. /* Values for flagsOut parameter in QTVRBackBufferImaging callback*/
  338. enum {
  339.     kQTVRBackBufferFlagDidDraw    = 1L << 0,
  340.     kQTVRBackBufferFlagLastFlag    = 1L << 31
  341. };
  342.  
  343. /* QTVRCursorRecord used in QTVRReplaceCursor*/
  344.  
  345. struct QTVRCursorRecord {
  346.     UInt16                             theType;                    /* field was previously named "type"*/
  347.     SInt16                             rsrcID;
  348.     Handle                             handle;
  349. };
  350. typedef struct QTVRCursorRecord            QTVRCursorRecord;
  351.  
  352. struct QTVRFloatPoint {
  353.     float                             x;
  354.     float                             y;
  355. };
  356. typedef struct QTVRFloatPoint            QTVRFloatPoint;
  357. /* Struct used for areasOfInterest parameter in QTVRSetBackBufferImagingProc*/
  358.  
  359. struct QTVRAreaOfInterest {
  360.     float                             panAngle;
  361.     float                             tiltAngle;
  362.     float                             width;
  363.     float                             height;
  364.     UInt32                             flags;
  365. };
  366. typedef struct QTVRAreaOfInterest        QTVRAreaOfInterest;
  367. /*
  368.   =================================================================================================
  369.    Callback routines 
  370.   -------------------------------------------------------------------------------------------------
  371. */
  372.  
  373. typedef CALLBACK_API( OSErr , QTVRLeavingNodeProcPtr )(QTVRInstance qtvr, UInt32 fromNodeID, UInt32 toNodeID, Boolean *cancel, SInt32 refCon);
  374. typedef CALLBACK_API( OSErr , QTVREnteringNodeProcPtr )(QTVRInstance qtvr, UInt32 nodeID, SInt32 refCon);
  375. typedef CALLBACK_API( OSErr , QTVRMouseOverHotSpotProcPtr )(QTVRInstance qtvr, UInt32 hotSpotID, UInt32 flags, SInt32 refCon);
  376. typedef CALLBACK_API( OSErr , QTVRImagingCompleteProcPtr )(QTVRInstance qtvr, SInt32 refCon);
  377. typedef CALLBACK_API( OSErr , QTVRBackBufferImagingProcPtr )(QTVRInstance qtvr, Rect *drawRect, UInt16 areaIndex, UInt32 flagsIn, UInt32 *flagsOut, SInt32 refCon);
  378. typedef STACK_UPP_TYPE(QTVRLeavingNodeProcPtr)                     QTVRLeavingNodeUPP;
  379. typedef STACK_UPP_TYPE(QTVREnteringNodeProcPtr)                 QTVREnteringNodeUPP;
  380. typedef STACK_UPP_TYPE(QTVRMouseOverHotSpotProcPtr)             QTVRMouseOverHotSpotUPP;
  381. typedef STACK_UPP_TYPE(QTVRImagingCompleteProcPtr)                 QTVRImagingCompleteUPP;
  382. typedef STACK_UPP_TYPE(QTVRBackBufferImagingProcPtr)             QTVRBackBufferImagingUPP;
  383. #if OPAQUE_UPP_TYPES
  384.     EXTERN_API(QTVRLeavingNodeUPP)
  385.     NewQTVRLeavingNodeUPP           (QTVRLeavingNodeProcPtr    userRoutine);
  386.  
  387.     EXTERN_API(QTVREnteringNodeUPP)
  388.     NewQTVREnteringNodeUPP           (QTVREnteringNodeProcPtr    userRoutine);
  389.  
  390.     EXTERN_API(QTVRMouseOverHotSpotUPP)
  391.     NewQTVRMouseOverHotSpotUPP       (QTVRMouseOverHotSpotProcPtr userRoutine);
  392.  
  393.     EXTERN_API(QTVRImagingCompleteUPP)
  394.     NewQTVRImagingCompleteUPP       (QTVRImagingCompleteProcPtr userRoutine);
  395.  
  396.     EXTERN_API(QTVRBackBufferImagingUPP)
  397.     NewQTVRBackBufferImagingUPP       (QTVRBackBufferImagingProcPtr userRoutine);
  398.  
  399.     EXTERN_API(void)
  400.     DisposeQTVRLeavingNodeUPP       (QTVRLeavingNodeUPP        userUPP);
  401.  
  402.     EXTERN_API(void)
  403.     DisposeQTVREnteringNodeUPP       (QTVREnteringNodeUPP        userUPP);
  404.  
  405.     EXTERN_API(void)
  406.     DisposeQTVRMouseOverHotSpotUPP    (QTVRMouseOverHotSpotUPP userUPP);
  407.  
  408.     EXTERN_API(void)
  409.     DisposeQTVRImagingCompleteUPP    (QTVRImagingCompleteUPP userUPP);
  410.  
  411.     EXTERN_API(void)
  412.     DisposeQTVRBackBufferImagingUPP    (QTVRBackBufferImagingUPP userUPP);
  413.  
  414.     EXTERN_API(OSErr)
  415.     InvokeQTVRLeavingNodeUPP       (QTVRInstance            qtvr,
  416.                                     UInt32                    fromNodeID,
  417.                                     UInt32                    toNodeID,
  418.                                     Boolean *                cancel,
  419.                                     SInt32                    refCon,
  420.                                     QTVRLeavingNodeUPP        userUPP);
  421.  
  422.     EXTERN_API(OSErr)
  423.     InvokeQTVREnteringNodeUPP       (QTVRInstance            qtvr,
  424.                                     UInt32                    nodeID,
  425.                                     SInt32                    refCon,
  426.                                     QTVREnteringNodeUPP        userUPP);
  427.  
  428.     EXTERN_API(OSErr)
  429.     InvokeQTVRMouseOverHotSpotUPP    (QTVRInstance            qtvr,
  430.                                     UInt32                    hotSpotID,
  431.                                     UInt32                    flags,
  432.                                     SInt32                    refCon,
  433.                                     QTVRMouseOverHotSpotUPP    userUPP);
  434.  
  435.     EXTERN_API(OSErr)
  436.     InvokeQTVRImagingCompleteUPP    (QTVRInstance            qtvr,
  437.                                     SInt32                    refCon,
  438.                                     QTVRImagingCompleteUPP    userUPP);
  439.  
  440.     EXTERN_API(OSErr)
  441.     InvokeQTVRBackBufferImagingUPP    (QTVRInstance            qtvr,
  442.                                     Rect *                    drawRect,
  443.                                     UInt16                    areaIndex,
  444.                                     UInt32                    flagsIn,
  445.                                     UInt32 *                flagsOut,
  446.                                     SInt32                    refCon,
  447.                                     QTVRBackBufferImagingUPP userUPP);
  448.  
  449. #else
  450.     enum { uppQTVRLeavingNodeProcInfo = 0x0000FFE0 };                 /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  451.     enum { uppQTVREnteringNodeProcInfo = 0x00000FE0 };                 /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  452.     enum { uppQTVRMouseOverHotSpotProcInfo = 0x00003FE0 };             /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  453.     enum { uppQTVRImagingCompleteProcInfo = 0x000003E0 };             /* pascal 2_bytes Func(4_bytes, 4_bytes) */
  454.     enum { uppQTVRBackBufferImagingProcInfo = 0x0003FBE0 };         /* pascal 2_bytes Func(4_bytes, 4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes) */
  455.     #define NewQTVRLeavingNodeUPP(userRoutine)                         (QTVRLeavingNodeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVRLeavingNodeProcInfo, GetCurrentArchitecture())
  456.     #define NewQTVREnteringNodeUPP(userRoutine)                     (QTVREnteringNodeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVREnteringNodeProcInfo, GetCurrentArchitecture())
  457.     #define NewQTVRMouseOverHotSpotUPP(userRoutine)                 (QTVRMouseOverHotSpotUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVRMouseOverHotSpotProcInfo, GetCurrentArchitecture())
  458.     #define NewQTVRImagingCompleteUPP(userRoutine)                     (QTVRImagingCompleteUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVRImagingCompleteProcInfo, GetCurrentArchitecture())
  459.     #define NewQTVRBackBufferImagingUPP(userRoutine)                 (QTVRBackBufferImagingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVRBackBufferImagingProcInfo, GetCurrentArchitecture())
  460.     #define DisposeQTVRLeavingNodeUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  461.     #define DisposeQTVREnteringNodeUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  462.     #define DisposeQTVRMouseOverHotSpotUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  463.     #define DisposeQTVRImagingCompleteUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  464.     #define DisposeQTVRBackBufferImagingUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  465.     #define InvokeQTVRLeavingNodeUPP(qtvr, fromNodeID, toNodeID, cancel, refCon, userUPP)  (OSErr)CALL_FIVE_PARAMETER_UPP((userUPP), uppQTVRLeavingNodeProcInfo, (qtvr), (fromNodeID), (toNodeID), (cancel), (refCon))
  466.     #define InvokeQTVREnteringNodeUPP(qtvr, nodeID, refCon, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppQTVREnteringNodeProcInfo, (qtvr), (nodeID), (refCon))
  467.     #define InvokeQTVRMouseOverHotSpotUPP(qtvr, hotSpotID, flags, refCon, userUPP)  (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppQTVRMouseOverHotSpotProcInfo, (qtvr), (hotSpotID), (flags), (refCon))
  468.     #define InvokeQTVRImagingCompleteUPP(qtvr, refCon, userUPP)     (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppQTVRImagingCompleteProcInfo, (qtvr), (refCon))
  469.     #define InvokeQTVRBackBufferImagingUPP(qtvr, drawRect, areaIndex, flagsIn, flagsOut, refCon, userUPP)  (OSErr)CALL_SIX_PARAMETER_UPP((userUPP), uppQTVRBackBufferImagingProcInfo, (qtvr), (drawRect), (areaIndex), (flagsIn), (flagsOut), (refCon))
  470. #endif
  471. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  472. #define NewQTVRLeavingNodeProc(userRoutine)                     NewQTVRLeavingNodeUPP(userRoutine)
  473. #define NewQTVREnteringNodeProc(userRoutine)                     NewQTVREnteringNodeUPP(userRoutine)
  474. #define NewQTVRMouseOverHotSpotProc(userRoutine)                 NewQTVRMouseOverHotSpotUPP(userRoutine)
  475. #define NewQTVRImagingCompleteProc(userRoutine)                 NewQTVRImagingCompleteUPP(userRoutine)
  476. #define NewQTVRBackBufferImagingProc(userRoutine)                 NewQTVRBackBufferImagingUPP(userRoutine)
  477. #define CallQTVRLeavingNodeProc(userRoutine, qtvr, fromNodeID, toNodeID, cancel, refCon) InvokeQTVRLeavingNodeUPP(qtvr, fromNodeID, toNodeID, cancel, refCon, userRoutine)
  478. #define CallQTVREnteringNodeProc(userRoutine, qtvr, nodeID, refCon) InvokeQTVREnteringNodeUPP(qtvr, nodeID, refCon, userRoutine)
  479. #define CallQTVRMouseOverHotSpotProc(userRoutine, qtvr, hotSpotID, flags, refCon) InvokeQTVRMouseOverHotSpotUPP(qtvr, hotSpotID, flags, refCon, userRoutine)
  480. #define CallQTVRImagingCompleteProc(userRoutine, qtvr, refCon)    InvokeQTVRImagingCompleteUPP(qtvr, refCon, userRoutine)
  481. #define CallQTVRBackBufferImagingProc(userRoutine, qtvr, drawRect, areaIndex, flagsIn, flagsOut, refCon) InvokeQTVRBackBufferImagingUPP(qtvr, drawRect, areaIndex, flagsIn, flagsOut, refCon, userRoutine)
  482. /*
  483.   =================================================================================================
  484.     QTVR Intercept Struct, Callback, Routine Descriptors 
  485.   -------------------------------------------------------------------------------------------------
  486. */
  487.  
  488. enum {
  489.     kQTVRSetPanAngleSelector    = 0x2000,
  490.     kQTVRSetTiltAngleSelector    = 0x2001,
  491.     kQTVRSetFieldOfViewSelector    = 0x2002,
  492.     kQTVRSetViewCenterSelector    = 0x2003,
  493.     kQTVRMouseEnterSelector        = 0x2004,
  494.     kQTVRMouseWithinSelector    = 0x2005,
  495.     kQTVRMouseLeaveSelector        = 0x2006,
  496.     kQTVRMouseDownSelector        = 0x2007,
  497.     kQTVRMouseStillDownSelector    = 0x2008,
  498.     kQTVRMouseUpSelector        = 0x2009,
  499.     kQTVRTriggerHotSpotSelector    = 0x200A,
  500.     kQTVRGetHotSpotTypeSelector    = 0x200B                        /* Requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)*/
  501. };
  502.  
  503.  
  504. typedef UInt32                             QTVRProcSelector;
  505.  
  506. struct QTVRInterceptRecord {
  507.     SInt32                             reserved1;
  508.     SInt32                             selector;
  509.  
  510.     SInt32                             reserved2;
  511.     SInt32                             reserved3;
  512.  
  513.     SInt32                             paramCount;
  514.     void *                            parameter[6];
  515. };
  516. typedef struct QTVRInterceptRecord        QTVRInterceptRecord;
  517.  
  518. typedef QTVRInterceptRecord *            QTVRInterceptPtr;
  519. /* Prototype for Intercept Proc callback*/
  520. typedef CALLBACK_API( void , QTVRInterceptProcPtr )(QTVRInstance qtvr, QTVRInterceptPtr qtvrMsg, SInt32 refCon, Boolean *cancel);
  521. typedef STACK_UPP_TYPE(QTVRInterceptProcPtr)                     QTVRInterceptUPP;
  522. #if OPAQUE_UPP_TYPES
  523.     EXTERN_API(QTVRInterceptUPP)
  524.     NewQTVRInterceptUPP               (QTVRInterceptProcPtr    userRoutine);
  525.  
  526.     EXTERN_API(void)
  527.     DisposeQTVRInterceptUPP           (QTVRInterceptUPP        userUPP);
  528.  
  529.     EXTERN_API(void)
  530.     InvokeQTVRInterceptUPP           (QTVRInstance            qtvr,
  531.                                     QTVRInterceptPtr        qtvrMsg,
  532.                                     SInt32                    refCon,
  533.                                     Boolean *                cancel,
  534.                                     QTVRInterceptUPP        userUPP);
  535.  
  536. #else
  537.     enum { uppQTVRInterceptProcInfo = 0x00003FC0 };                 /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  538.     #define NewQTVRInterceptUPP(userRoutine)                         (QTVRInterceptUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVRInterceptProcInfo, GetCurrentArchitecture())
  539.     #define DisposeQTVRInterceptUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  540.     #define InvokeQTVRInterceptUPP(qtvr, qtvrMsg, refCon, cancel, userUPP)  CALL_FOUR_PARAMETER_UPP((userUPP), uppQTVRInterceptProcInfo, (qtvr), (qtvrMsg), (refCon), (cancel))
  541. #endif
  542. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  543. #define NewQTVRInterceptProc(userRoutine)                         NewQTVRInterceptUPP(userRoutine)
  544. #define CallQTVRInterceptProc(userRoutine, qtvr, qtvrMsg, refCon, cancel) InvokeQTVRInterceptUPP(qtvr, qtvrMsg, refCon, cancel, userRoutine)
  545. /*
  546.   =================================================================================================
  547.     Initialization QTVR calls 
  548.   -------------------------------------------------------------------------------------------------
  549.    Requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10) and only work on Non-Macintosh platforms
  550. */
  551. #if !TARGET_OS_MAC
  552. EXTERN_API_C( OSErr )
  553. InitializeQTVR                    (void);
  554.  
  555. EXTERN_API_C( OSErr )
  556. TerminateQTVR                    (void);
  557.  
  558. #endif  /* !TARGET_OS_MAC */
  559.  
  560. /*
  561.   =================================================================================================
  562.     General QTVR calls 
  563.   -------------------------------------------------------------------------------------------------
  564. */
  565. EXTERN_API_C( Track )
  566. QTVRGetQTVRTrack                (Movie                     theMovie,
  567.                                  SInt32                 index);
  568.  
  569. EXTERN_API_C( OSErr )
  570. QTVRGetQTVRInstance                (QTVRInstance *            qtvr,
  571.                                  Track                     qtvrTrack,
  572.                                  MovieController         mc);
  573.  
  574. /*
  575.   =================================================================================================
  576.     Viewing Angles and Zooming 
  577.   -------------------------------------------------------------------------------------------------
  578. */
  579.  
  580. EXTERN_API_C( OSErr )
  581. QTVRSetPanAngle                    (QTVRInstance             qtvr,
  582.                                  float                     panAngle);
  583.  
  584. EXTERN_API_C( float )
  585. QTVRGetPanAngle                    (QTVRInstance             qtvr);
  586.  
  587. EXTERN_API_C( OSErr )
  588. QTVRSetTiltAngle                (QTVRInstance             qtvr,
  589.                                  float                     tiltAngle);
  590.  
  591. EXTERN_API_C( float )
  592. QTVRGetTiltAngle                (QTVRInstance             qtvr);
  593.  
  594. EXTERN_API_C( OSErr )
  595. QTVRSetFieldOfView                (QTVRInstance             qtvr,
  596.                                  float                     fieldOfView);
  597.  
  598. EXTERN_API_C( float )
  599. QTVRGetFieldOfView                (QTVRInstance             qtvr);
  600.  
  601. EXTERN_API_C( OSErr )
  602. QTVRShowDefaultView                (QTVRInstance             qtvr);
  603.  
  604. /* Object Specific*/
  605. EXTERN_API_C( OSErr )
  606. QTVRSetViewCenter                (QTVRInstance             qtvr,
  607.                                  const QTVRFloatPoint *    viewCenter);
  608.  
  609. EXTERN_API_C( OSErr )
  610. QTVRGetViewCenter                (QTVRInstance             qtvr,
  611.                                  QTVRFloatPoint *        viewCenter);
  612.  
  613. EXTERN_API_C( OSErr )
  614. QTVRNudge                        (QTVRInstance             qtvr,
  615.                                  QTVRNudgeControl         direction);
  616.  
  617. /* QTVRInteractionNudge requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)*/
  618. EXTERN_API_C( OSErr )
  619. QTVRInteractionNudge            (QTVRInstance             qtvr,
  620.                                  QTVRNudgeControl         direction);
  621.  
  622. /*
  623.   =================================================================================================
  624.     Scene and Node Location Information 
  625.   -------------------------------------------------------------------------------------------------
  626. */
  627.  
  628. EXTERN_API_C( OSErr )
  629. QTVRGetVRWorld                    (QTVRInstance             qtvr,
  630.                                  QTAtomContainer *        VRWorld);
  631.  
  632. EXTERN_API_C( OSErr )
  633. QTVRGetNodeInfo                    (QTVRInstance             qtvr,
  634.                                  UInt32                 nodeID,
  635.                                  QTAtomContainer *        nodeInfo);
  636.  
  637. EXTERN_API_C( OSErr )
  638. QTVRGoToNodeID                    (QTVRInstance             qtvr,
  639.                                  UInt32                 nodeID);
  640.  
  641. EXTERN_API_C( UInt32 )
  642. QTVRGetCurrentNodeID            (QTVRInstance             qtvr);
  643.  
  644. EXTERN_API_C( OSType )
  645. QTVRGetNodeType                    (QTVRInstance             qtvr,
  646.                                  UInt32                 nodeID);
  647.  
  648. /*
  649.   =================================================================================================
  650.     Hot Spot related calls 
  651.   -------------------------------------------------------------------------------------------------
  652. */
  653.  
  654. EXTERN_API_C( OSErr )
  655. QTVRPtToHotSpotID                (QTVRInstance             qtvr,
  656.                                  Point                     pt,
  657.                                  UInt32 *                hotSpotID);
  658.  
  659. /* QTVRGetHotSpotType requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)*/
  660. EXTERN_API_C( OSErr )
  661. QTVRGetHotSpotType                (QTVRInstance             qtvr,
  662.                                  UInt32                 hotSpotID,
  663.                                  OSType *                hotSpotType);
  664.  
  665. EXTERN_API_C( OSErr )
  666. QTVRTriggerHotSpot                (QTVRInstance             qtvr,
  667.                                  UInt32                 hotSpotID,
  668.                                  QTAtomContainer         nodeInfo,
  669.                                  QTAtom                 selectedAtom);
  670.  
  671. EXTERN_API_C( OSErr )
  672. QTVRSetMouseOverHotSpotProc        (QTVRInstance             qtvr,
  673.                                  QTVRMouseOverHotSpotUPP  mouseOverHotSpotProc,
  674.                                  SInt32                 refCon,
  675.                                  UInt32                 flags);
  676.  
  677. EXTERN_API_C( OSErr )
  678. QTVREnableHotSpot                (QTVRInstance             qtvr,
  679.                                  UInt32                 enableFlag,
  680.                                  UInt32                 hotSpotValue,
  681.                                  Boolean                 enable);
  682.  
  683. EXTERN_API_C( UInt32 )
  684. QTVRGetVisibleHotSpots            (QTVRInstance             qtvr,
  685.                                  Handle                 hotSpots);
  686.  
  687. EXTERN_API_C( OSErr )
  688. QTVRGetHotSpotRegion            (QTVRInstance             qtvr,
  689.                                  UInt32                 hotSpotID,
  690.                                  RgnHandle                 hotSpotRegion);
  691.  
  692. /*
  693.   =================================================================================================
  694.     Event & Cursor Handling Calls 
  695.   -------------------------------------------------------------------------------------------------
  696. */
  697.  
  698. EXTERN_API_C( OSErr )
  699. QTVRSetMouseOverTracking        (QTVRInstance             qtvr,
  700.                                  Boolean                 enable);
  701.  
  702. EXTERN_API_C( Boolean )
  703. QTVRGetMouseOverTracking        (QTVRInstance             qtvr);
  704.  
  705. EXTERN_API_C( OSErr )
  706. QTVRSetMouseDownTracking        (QTVRInstance             qtvr,
  707.                                  Boolean                 enable);
  708.  
  709. EXTERN_API_C( Boolean )
  710. QTVRGetMouseDownTracking        (QTVRInstance             qtvr);
  711.  
  712. EXTERN_API_C( OSErr )
  713. QTVRMouseEnter                    (QTVRInstance             qtvr,
  714.                                  Point                     pt,
  715.                                  UInt32 *                hotSpotID,
  716.                                  WindowPtr                 w);
  717.  
  718. EXTERN_API_C( OSErr )
  719. QTVRMouseWithin                    (QTVRInstance             qtvr,
  720.                                  Point                     pt,
  721.                                  UInt32 *                hotSpotID,
  722.                                  WindowPtr                 w);
  723.  
  724. EXTERN_API_C( OSErr )
  725. QTVRMouseLeave                    (QTVRInstance             qtvr,
  726.                                  Point                     pt,
  727.                                  WindowPtr                 w);
  728.  
  729. EXTERN_API_C( OSErr )
  730. QTVRMouseDown                    (QTVRInstance             qtvr,
  731.                                  Point                     pt,
  732.                                  UInt32                 when,
  733.                                  UInt16                 modifiers,
  734.                                  UInt32 *                hotSpotID,
  735.                                  WindowPtr                 w);
  736.  
  737. EXTERN_API_C( OSErr )
  738. QTVRMouseStillDown                (QTVRInstance             qtvr,
  739.                                  Point                     pt,
  740.                                  UInt32 *                hotSpotID,
  741.                                  WindowPtr                 w);
  742.  
  743. EXTERN_API_C( OSErr )
  744. QTVRMouseUp                        (QTVRInstance             qtvr,
  745.                                  Point                     pt,
  746.                                  UInt32 *                hotSpotID,
  747.                                  WindowPtr                 w);
  748.  
  749. /* These require QTVR 2.01 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion01)*/
  750. EXTERN_API_C( OSErr )
  751. QTVRMouseStillDownExtended        (QTVRInstance             qtvr,
  752.                                  Point                     pt,
  753.                                  UInt32 *                hotSpotID,
  754.                                  WindowPtr                 w,
  755.                                  UInt32                 when,
  756.                                  UInt16                 modifiers);
  757.  
  758. EXTERN_API_C( OSErr )
  759. QTVRMouseUpExtended                (QTVRInstance             qtvr,
  760.                                  Point                     pt,
  761.                                  UInt32 *                hotSpotID,
  762.                                  WindowPtr                 w,
  763.                                  UInt32                 when,
  764.                                  UInt16                 modifiers);
  765.  
  766. /*
  767.   =================================================================================================
  768.     Intercept Routines 
  769.   -------------------------------------------------------------------------------------------------
  770. */
  771.  
  772. EXTERN_API_C( OSErr )
  773. QTVRInstallInterceptProc        (QTVRInstance             qtvr,
  774.                                  QTVRProcSelector         selector,
  775.                                  QTVRInterceptUPP         interceptProc,
  776.                                  SInt32                 refCon,
  777.                                  UInt32                 flags);
  778.  
  779. EXTERN_API_C( OSErr )
  780. QTVRCallInterceptedProc            (QTVRInstance             qtvr,
  781.                                  QTVRInterceptRecord *    qtvrMsg);
  782.  
  783. /*
  784.   =================================================================================================
  785.     Object Movie Specific Calls 
  786.   -------------------------------------------------------------------------------------------------
  787.    QTVRGetCurrentMouseMode requires QTRVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)
  788. */
  789. EXTERN_API_C( UInt32 )
  790. QTVRGetCurrentMouseMode            (QTVRInstance             qtvr);
  791.  
  792. EXTERN_API_C( OSErr )
  793. QTVRSetFrameRate                (QTVRInstance             qtvr,
  794.                                  float                     rate);
  795.  
  796. EXTERN_API_C( float )
  797. QTVRGetFrameRate                (QTVRInstance             qtvr);
  798.  
  799. EXTERN_API_C( OSErr )
  800. QTVRSetViewRate                    (QTVRInstance             qtvr,
  801.                                  float                     rate);
  802.  
  803. EXTERN_API_C( float )
  804. QTVRGetViewRate                    (QTVRInstance             qtvr);
  805.  
  806. EXTERN_API_C( OSErr )
  807. QTVRSetViewCurrentTime            (QTVRInstance             qtvr,
  808.                                  TimeValue                 time);
  809.  
  810. EXTERN_API_C( TimeValue )
  811. QTVRGetViewCurrentTime            (QTVRInstance             qtvr);
  812.  
  813. EXTERN_API_C( TimeValue )
  814. QTVRGetCurrentViewDuration        (QTVRInstance             qtvr);
  815.  
  816. /*
  817.   =================================================================================================
  818.    View State Calls - QTVR Object Only
  819.   -------------------------------------------------------------------------------------------------
  820. */
  821.  
  822. EXTERN_API_C( OSErr )
  823. QTVRSetViewState                (QTVRInstance             qtvr,
  824.                                  QTVRViewStateType         viewStateType,
  825.                                  UInt16                 state);
  826.  
  827. EXTERN_API_C( OSErr )
  828. QTVRGetViewState                (QTVRInstance             qtvr,
  829.                                  QTVRViewStateType         viewStateType,
  830.                                  UInt16 *                state);
  831.  
  832. EXTERN_API_C( UInt16 )
  833. QTVRGetViewStateCount            (QTVRInstance             qtvr);
  834.  
  835. EXTERN_API_C( OSErr )
  836. QTVRSetAnimationSetting            (QTVRInstance             qtvr,
  837.                                  QTVRObjectAnimationSetting  setting,
  838.                                  Boolean                 enable);
  839.  
  840. EXTERN_API_C( OSErr )
  841. QTVRGetAnimationSetting            (QTVRInstance             qtvr,
  842.                                  QTVRObjectAnimationSetting  setting,
  843.                                  Boolean *                enable);
  844.  
  845. EXTERN_API_C( OSErr )
  846. QTVRSetControlSetting            (QTVRInstance             qtvr,
  847.                                  QTVRControlSetting     setting,
  848.                                  Boolean                 enable);
  849.  
  850. EXTERN_API_C( OSErr )
  851. QTVRGetControlSetting            (QTVRInstance             qtvr,
  852.                                  QTVRControlSetting     setting,
  853.                                  Boolean *                enable);
  854.  
  855. EXTERN_API_C( OSErr )
  856. QTVREnableFrameAnimation        (QTVRInstance             qtvr,
  857.                                  Boolean                 enable);
  858.  
  859. EXTERN_API_C( Boolean )
  860. QTVRGetFrameAnimation            (QTVRInstance             qtvr);
  861.  
  862. EXTERN_API_C( OSErr )
  863. QTVREnableViewAnimation            (QTVRInstance             qtvr,
  864.                                  Boolean                 enable);
  865.  
  866. EXTERN_API_C( Boolean )
  867. QTVRGetViewAnimation            (QTVRInstance             qtvr);
  868.  
  869.  
  870. /*
  871.   =================================================================================================
  872.     Imaging Characteristics 
  873.   -------------------------------------------------------------------------------------------------
  874. */
  875.  
  876. EXTERN_API_C( OSErr )
  877. QTVRSetVisible                    (QTVRInstance             qtvr,
  878.                                  Boolean                 visible);
  879.  
  880. EXTERN_API_C( Boolean )
  881. QTVRGetVisible                    (QTVRInstance             qtvr);
  882.  
  883. EXTERN_API_C( OSErr )
  884. QTVRSetImagingProperty            (QTVRInstance             qtvr,
  885.                                  QTVRImagingMode         imagingMode,
  886.                                  UInt32                 imagingProperty,
  887.                                  SInt32                 propertyValue);
  888.  
  889. EXTERN_API_C( OSErr )
  890. QTVRGetImagingProperty            (QTVRInstance             qtvr,
  891.                                  QTVRImagingMode         imagingMode,
  892.                                  UInt32                 imagingProperty,
  893.                                  SInt32 *                propertyValue);
  894.  
  895. EXTERN_API_C( OSErr )
  896. QTVRUpdate                        (QTVRInstance             qtvr,
  897.                                  QTVRImagingMode         imagingMode);
  898.  
  899. EXTERN_API_C( OSErr )
  900. QTVRBeginUpdateStream            (QTVRInstance             qtvr,
  901.                                  QTVRImagingMode         imagingMode);
  902.  
  903. EXTERN_API_C( OSErr )
  904. QTVREndUpdateStream                (QTVRInstance             qtvr);
  905.  
  906. EXTERN_API_C( OSErr )
  907. QTVRSetTransitionProperty        (QTVRInstance             qtvr,
  908.                                  UInt32                 transitionType,
  909.                                  UInt32                 transitionProperty,
  910.                                  SInt32                 transitionValue);
  911.  
  912. EXTERN_API_C( OSErr )
  913. QTVREnableTransition            (QTVRInstance             qtvr,
  914.                                  UInt32                 transitionType,
  915.                                  Boolean                 enable);
  916.  
  917. /*
  918.   =================================================================================================
  919.     Basic Conversion and Math Routines 
  920.   -------------------------------------------------------------------------------------------------
  921. */
  922.  
  923. EXTERN_API_C( OSErr )
  924. QTVRSetAngularUnits                (QTVRInstance             qtvr,
  925.                                  QTVRAngularUnits         units);
  926.  
  927. EXTERN_API_C( QTVRAngularUnits )
  928. QTVRGetAngularUnits                (QTVRInstance             qtvr);
  929.  
  930. /* Pano specific routines*/
  931. EXTERN_API_C( OSErr )
  932. QTVRPtToAngles                    (QTVRInstance             qtvr,
  933.                                  Point                     pt,
  934.                                  float *                panAngle,
  935.                                  float *                tiltAngle);
  936.  
  937. EXTERN_API_C( OSErr )
  938. QTVRCoordToAngles                (QTVRInstance             qtvr,
  939.                                  QTVRFloatPoint *        coord,
  940.                                  float *                panAngle,
  941.                                  float *                tiltAngle);
  942.  
  943. EXTERN_API_C( OSErr )
  944. QTVRAnglesToCoord                (QTVRInstance             qtvr,
  945.                                  float                     panAngle,
  946.                                  float                     tiltAngle,
  947.                                  QTVRFloatPoint *        coord);
  948.  
  949. /* Object specific routines*/
  950. EXTERN_API_C( short )
  951. QTVRPanToColumn                    (QTVRInstance             qtvr,
  952.                                  float                     panAngle);
  953.  
  954. /* zero based    */
  955. EXTERN_API_C( float )
  956. QTVRColumnToPan                    (QTVRInstance             qtvr,
  957.                                  short                     column);
  958.  
  959. /* zero based    */
  960. EXTERN_API_C( short )
  961. QTVRTiltToRow                    (QTVRInstance             qtvr,
  962.                                  float                     tiltAngle);
  963.  
  964. /* zero based    */
  965. EXTERN_API_C( float )
  966. QTVRRowToTilt                    (QTVRInstance             qtvr,
  967.                                  short                     row);
  968.  
  969. /* zero based                */
  970. EXTERN_API_C( OSErr )
  971. QTVRWrapAndConstrain            (QTVRInstance             qtvr,
  972.                                  short                     kind,
  973.                                  float                     value,
  974.                                  float *                result);
  975.  
  976.  
  977. /*
  978.   =================================================================================================
  979.     Interaction Routines 
  980.   -------------------------------------------------------------------------------------------------
  981. */
  982.  
  983. EXTERN_API_C( OSErr )
  984. QTVRSetEnteringNodeProc            (QTVRInstance             qtvr,
  985.                                  QTVREnteringNodeUPP     enteringNodeProc,
  986.                                  SInt32                 refCon,
  987.                                  UInt32                 flags);
  988.  
  989. EXTERN_API_C( OSErr )
  990. QTVRSetLeavingNodeProc            (QTVRInstance             qtvr,
  991.                                  QTVRLeavingNodeUPP     leavingNodeProc,
  992.                                  SInt32                 refCon,
  993.                                  UInt32                 flags);
  994.  
  995. EXTERN_API_C( OSErr )
  996. QTVRSetInteractionProperty        (QTVRInstance             qtvr,
  997.                                  UInt32                 property,
  998.                                  void *                    value);
  999.  
  1000. EXTERN_API_C( OSErr )
  1001. QTVRGetInteractionProperty        (QTVRInstance             qtvr,
  1002.                                  UInt32                 property,
  1003.                                  void *                    value);
  1004.  
  1005. EXTERN_API_C( OSErr )
  1006. QTVRReplaceCursor                (QTVRInstance             qtvr,
  1007.                                  QTVRCursorRecord *        cursRecord);
  1008.  
  1009. /*
  1010.   =================================================================================================
  1011.     Viewing Limits and Constraints 
  1012.   -------------------------------------------------------------------------------------------------
  1013. */
  1014.  
  1015. EXTERN_API_C( OSErr )
  1016. QTVRGetViewingLimits            (QTVRInstance             qtvr,
  1017.                                  UInt16                 kind,
  1018.                                  float *                minValue,
  1019.                                  float *                maxValue);
  1020.  
  1021. EXTERN_API_C( UInt32 )
  1022. QTVRGetConstraintStatus            (QTVRInstance             qtvr);
  1023.  
  1024. EXTERN_API_C( OSErr )
  1025. QTVRGetConstraints                (QTVRInstance             qtvr,
  1026.                                  UInt16                 kind,
  1027.                                  float *                minValue,
  1028.                                  float *                maxValue);
  1029.  
  1030. EXTERN_API_C( OSErr )
  1031. QTVRSetConstraints                (QTVRInstance             qtvr,
  1032.                                  UInt16                 kind,
  1033.                                  float                     minValue,
  1034.                                  float                     maxValue);
  1035.  
  1036.  
  1037. /*
  1038.   =================================================================================================
  1039.     Back Buffer Memory Management 
  1040.   -------------------------------------------------------------------------------------------------
  1041. */
  1042.  
  1043. EXTERN_API_C( OSErr )
  1044. QTVRGetAvailableResolutions        (QTVRInstance             qtvr,
  1045.                                  UInt16 *                resolutionsMask);
  1046.  
  1047. /* These require QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)*/
  1048. EXTERN_API_C( OSErr )
  1049. QTVRGetBackBufferMemInfo        (QTVRInstance             qtvr,
  1050.                                  UInt32                 geometry,
  1051.                                  UInt16                 resolution,
  1052.                                  UInt32                 cachePixelFormat,
  1053.                                  SInt32 *                minCacheBytes,
  1054.                                  SInt32 *                suggestedCacheBytes,
  1055.                                  SInt32 *                fullCacheBytes);
  1056.  
  1057. EXTERN_API_C( OSErr )
  1058. QTVRGetBackBufferSettings        (QTVRInstance             qtvr,
  1059.                                  UInt32 *                geometry,
  1060.                                  UInt16 *                resolution,
  1061.                                  UInt32 *                cachePixelFormat,
  1062.                                  SInt16 *                cacheSize);
  1063.  
  1064. EXTERN_API_C( OSErr )
  1065. QTVRSetBackBufferPrefs            (QTVRInstance             qtvr,
  1066.                                  UInt32                 geometry,
  1067.                                  UInt16                 resolution,
  1068.                                  UInt32                 cachePixelFormat,
  1069.                                  SInt16                 cacheSize);
  1070.  
  1071. #if QTVR_OLD_CALLS
  1072. #if TARGET_OS_MAC
  1073. /*
  1074.    These *Cache* calls have been replaced with the *BackBuffer* versions above.
  1075.    However, the *BackBuffer* calls require QuickTime VR 2.1 to work;
  1076.     these calls will work with QuickTime VR 2.0 and 2.0.1, but only on a Macintosh.
  1077. */
  1078. EXTERN_API_C( OSErr )
  1079. QTVRGetCacheMemInfo                (QTVRInstance             qtvr,
  1080.                                  UInt16                 resolution,
  1081.                                  SInt16                 cacheDepth,
  1082.                                  SInt32 *                minCacheBytes,
  1083.                                  SInt32 *                suggestedCacheBytes,
  1084.                                  SInt32 *                fullCacheBytes);
  1085.  
  1086. EXTERN_API_C( OSErr )
  1087. QTVRGetCacheSettings            (QTVRInstance             qtvr,
  1088.                                  UInt16 *                resolution,
  1089.                                  SInt16 *                cacheDepth,
  1090.                                  SInt16 *                cacheSize);
  1091.  
  1092. EXTERN_API_C( OSErr )
  1093. QTVRSetCachePrefs                (QTVRInstance             qtvr,
  1094.                                  UInt16                 resolution,
  1095.                                  SInt16                 cacheDepth,
  1096.                                  SInt16                 cacheSize);
  1097.  
  1098. #endif  /* TARGET_OS_MAC */
  1099.  
  1100. #endif  /* QTVR_OLD_CALLS */
  1101.  
  1102. /*
  1103.   =================================================================================================
  1104.     Buffer Access 
  1105.   -------------------------------------------------------------------------------------------------
  1106. */
  1107.  
  1108. EXTERN_API_C( OSErr )
  1109. QTVRSetPrescreenImagingCompleteProc (QTVRInstance         qtvr,
  1110.                                  QTVRImagingCompleteUPP  imagingCompleteProc,
  1111.                                  SInt32                 refCon,
  1112.                                  UInt32                 flags);
  1113.  
  1114. EXTERN_API_C( OSErr )
  1115. QTVRSetBackBufferImagingProc    (QTVRInstance             qtvr,
  1116.                                  QTVRBackBufferImagingUPP  backBufferImagingProc,
  1117.                                  UInt16                 numAreas,
  1118.                                  QTVRAreaOfInterest     areasOfInterest[],
  1119.                                  SInt32                 refCon);
  1120.  
  1121. EXTERN_API_C( OSErr )
  1122. QTVRRefreshBackBuffer            (QTVRInstance             qtvr,
  1123.                                  UInt32                 flags);
  1124.  
  1125.  
  1126.  
  1127. /*
  1128.   =================================================================================================
  1129.     Old Names
  1130.   -------------------------------------------------------------------------------------------------
  1131. */
  1132. #if OLDROUTINENAMES
  1133. typedef QTVRCursorRecord                 CursorRecord;
  1134. typedef QTVRAreaOfInterest                 AreaOfInterest;
  1135. typedef QTVRFloatPoint                     FloatPoint;
  1136. typedef QTVRLeavingNodeProcPtr             LeavingNodeProcPtr;
  1137. typedef QTVRLeavingNodeUPP                 LeavingNodeUPP;
  1138. typedef QTVREnteringNodeProcPtr         EnteringNodeProcPtr;
  1139. typedef QTVREnteringNodeUPP             EnteringNodeUPP;
  1140. typedef QTVRMouseOverHotSpotProcPtr     MouseOverHotSpotProcPtr;
  1141. typedef QTVRMouseOverHotSpotUPP         MouseOverHotSpotUPP;
  1142. typedef QTVRImagingCompleteProcPtr         ImagingCompleteProcPtr;
  1143. typedef QTVRImagingCompleteUPP             ImagingCompleteUPP;
  1144. typedef QTVRBackBufferImagingProcPtr     BackBufferImagingProcPtr;
  1145. typedef QTVRBackBufferImagingUPP         BackBufferImagingUPP;
  1146. #endif  /* OLDROUTINENAMES */
  1147.  
  1148.  
  1149.  
  1150. #if PRAGMA_STRUCT_ALIGN
  1151.     #pragma options align=reset
  1152. #elif PRAGMA_STRUCT_PACKPUSH
  1153.     #pragma pack(pop)
  1154. #elif PRAGMA_STRUCT_PACK
  1155.     #pragma pack()
  1156. #endif
  1157.  
  1158. #ifdef PRAGMA_IMPORT_OFF
  1159. #pragma import off
  1160. #elif PRAGMA_IMPORT
  1161. #pragma import reset
  1162. #endif
  1163.  
  1164. #ifdef __cplusplus
  1165. }
  1166. #endif
  1167.  
  1168. #endif /* __QUICKTIMEVR__ */
  1169.  
  1170.